<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Blockly Games Admin</title>
    <link rel="stylesheet" href="common/common.css">
    <style>
      body {
        background-image: url("common/stripes.svg");
        background-repeat: repeat-y;
        padding: 1em 8em;
      }
      fieldset {
        margin-top: 2em;
        border-radius: 8px;
      }
      legend {
        font-size: larger;
      }
      svg {
        float: left;
        margin-right: 1em;
        opacity: .8;
      }
      #links>div {
        padding-top: 1ex;
        padding-bottom: 1ex;
        clear: both;
      }
      .afterIcon {
        padding-top: 5px;
      }
      ul li {
        margin-bottom: 5px;
      }
      .disabledAdminLink {
        text-decoration:line-through;
        cursor: not-allowed;
        color: #666;
      }
    </style>
  </head>
  <body>
    <h1><a class="htmlLink" href="./" data-href="index.html">Blockly Games</a> : Admin</h1>

    <fieldset>
      <legend>Storage</legend>
      <p>
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#000">
          <path d="M0 0h24v24H0z" fill="none"/>
          <path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"/>
        </svg>
        <div class="afterIcon">
          Moderate gallery submissions
        </div>
      </p>

      <ul>
        <li><a href="XXX/gallery.html?app=turtle">Turtle</a></li>
        <li><a href="XXX/gallery.html?app=movie">Movie</a></li>
        <li><a href="XXX/gallery.html?app=music">Music</a></li>
      </ul>

      <p>
        <svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 -960 960 960" fill="#000">
          <path d="M480-120q-151 0-255.5-46.5T120-280v-400q0-66 105.5-113T480-840q149 0 254.5 47T840-680v400q0 67-104.5 113.5T480-120Zm0-479q89 0 179-25.5T760-679q-11-29-100.5-55T480-760q-91 0-178.5 25.5T200-679q14 30 101.5 55T480-599Zm0 199q42 0 81-4t74.5-11.5q35.5-7.5 67-18.5t57.5-25v-120q-26 14-57.5 25t-67 18.5Q600-528 561-524t-81 4q-42 0-82-4t-75.5-11.5Q287-543 256-554t-56-25v120q25 14 56 25t66.5 18.5Q358-408 398-404t82 4Zm0 200q46 0 93.5-7t87.5-18.5q40-11.5 67-26t32-29.5v-98q-26 14-57.5 25t-67 18.5Q600-328 561-324t-81 4q-42 0-82-4t-75.5-11.5Q287-343 256-354t-56-25v99q5 15 31.5 29t66.5 25.5q40 11.5 88 18.5t94 7Z"/>
        </svg>
        <div class="afterIcon">
          Delete <a href="XXX/expiry.py">old stored programs</a> which haven't been loaded in two years.
        </div>
      </p>
    </fieldset>

    <fieldset>
      <legend>Debug</legend>
      <p>
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#000">
          <path clip-rule="evenodd" fill="none" d="M0 0h24v24H0z"/>
          <path d="M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"/>
        </svg>
        JavaScript code for Blockly Games is normally compressed so that it loads
        faster.  But compressed code is hard to hack or debug.  This control allows
        you to switch compression on or off for the duration of this session.
      </p>

      <p style="padding-left: 1em;">
        <input type="radio" name="debug" id="debug0" onchange="setDebug(false);">
        <label for="debug0">Use fast compressed code.  (Recommended.)</label>
      </p>

      <p style="padding-left: 1em;">
        <input type="radio" name="debug" id="debug1" onchange="setDebug(true);">
        <label for="debug1">Use slow uncompressed code.  (Hackers only.)</label>
      </p>
      <script>
  function setDebug(debug) {
    if (debug) {
      sessionStorage.setItem('debug', 1);
      console.info('Uncompressed mode activated.  Happy hacking!');
    } else {
      sessionStorage.removeItem('debug');
      console.info('Compressed mode activated.');
    }
  }

  (function() {
    var debug = !!sessionStorage.getItem('debug');
    document.getElementById(debug ? 'debug1' : 'debug0').checked = true;
  })();
      </script>
      <div>
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 -960 960 960" fill="#000">
          <path d="M480-120q-65 0-120.5-32T272-240H160v-80h84q-3-20-3.5-40t-.5-40h-80v-80h80q0-20 .5-40t3.5-40h-84v-80h112q14-23 31.5-43t40.5-35l-64-66 56-56 86 86q28-9 57-9t57 9l88-86 56 56-66 66q23 15 41.5 34.5T688-640h112v80h-84q3 20 3.5 40t.5 40h80v80h-80q0 20-.5 40t-3.5 40h84v80H688q-32 56-87.5 88T480-120Zm0-80q66 0 113-47t47-113v-160q0-66-47-113t-113-47q-66 0-113 47t-47 113v160q0 66 47 113t113 47Zm-80-120h160v-80H400v80Zm0-160h160v-80H400v80Zm80 40Z"/>
        </svg>
        <div class="afterIcon">
          Tests
        </div>
      </div>
      <ul>
        <li><a href="admin/form_test.html">Form Test Page</a></li>
      </ul>
    </fieldset>

    <fieldset id="links">
      <legend>Links</legend>
      <div>
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#000">
          <path d="M9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4zm2.5 2.1h-15V5h15v14.1zm0-16.1h-15c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/>
          <path fill="none" d="M0 0h24v24H0z"/>
        </svg>
        <div class="afterIcon">
          <a href="/awstats/awstats.pl">AWStats</a>
        </div>
      </div>

      <div>
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 -960 960 960" fill="#000">
          <path d="M251-160q-88 0-149.5-61.5T40-371q0-78 50-137t127-71q20-97 94-158.5T482-799q112 0 189 81.5T748-522v24q72-2 122 46.5T920-329q0 69-50 119t-119 50H251Zm0-60h500q45 0 77-32t32-77q0-45-32-77t-77-32h-63v-84q0-91-61-154t-149-63q-88 0-149.5 63T267-522h-19q-62 0-105 43.5T100-371q0 63 44 107t107 44Zm229-260Z"/>
        </svg>
        <div class="afterIcon">
          <a href="https://ca.ovh.com/">OVH dashboard</a>
        </div>
      </div>

      <div>
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 1024 1024">
          <path d="M512 0C229.25 0 0 229.25 0 512c0 226.25 146.688 418.125 350.156 485.812 25.594 4.688 34.938-11.125 34.938-24.625 0-12.188-0.469-52.562-0.719-95.312C242 908.812 211.906 817.5 211.906 817.5c-23.312-59.125-56.844-74.875-56.844-74.875-46.531-31.75 3.53-31.125 3.53-31.125 51.406 3.562 78.47 52.75 78.47 52.75 45.688 78.25 119.875 55.625 149 42.5 4.654-33 17.904-55.625 32.5-68.375C304.906 725.438 185.344 681.5 185.344 485.312c0-55.938 19.969-101.562 52.656-137.406-5.219-13-22.844-65.094 5.062-135.562 0 0 42.938-13.75 140.812 52.5 40.812-11.406 84.594-17.031 128.125-17.219 43.5 0.188 87.312 5.875 128.188 17.281 97.688-66.312 140.688-52.5 140.688-52.5 28 70.531 10.375 122.562 5.125 135.5 32.812 35.844 52.625 81.469 52.625 137.406 0 196.688-119.75 240-233.812 252.688 18.438 15.875 34.75 47 34.75 94.75 0 68.438-0.688 123.625-0.688 140.5 0 13.625 9.312 29.562 35.25 24.562C877.438 930 1024 738.125 1024 512 1024 229.25 794.75 0 512 0z"/>
        </svg>
        <div class="afterIcon">
          <a href="https://github.com/NeilFraser/blockly-games/">GitHub repo</a>
        </div>
      </div>

      <div>
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16">
          <path fill-rule="evenodd" d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"/>
        </svg>
        <div class="afterIcon">
          <a href="https://github.com/NeilFraser/blockly-games/wikis">Wiki</a>
        </div>
      </div>

      <div>
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#000">
          <path d="M0 0h24v24H0z" fill="none"/>
          <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"/>
        </svg>
        <div class="afterIcon">
          <a href="https://groups.google.com/forum/#!forum/blockly-games">Support group</a>
        </div>
      </div>
    </fieldset>
    <script src="common/relink.js"></script>
  </body>
</html>
